# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-huepy
_pkgname=huepy
pkgver=1.2.1
pkgrel=9
pkgdesc='Print awesomely in terminals.'
url='https://pypi.org/project/huepy/#files'
arch=('any')
license=('GPL3')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('94b15b9249f8790ffaffbb5e4dc200269c50c8e06433ba3501128c0d3fb3e96b6c5b2bf931f1dd87e40c451491679d0c4824e10b8c60138f9ad176b163180680')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/share/licenses/$pkgname"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

